<{include file="Public/top.html" }>
<style>
    #slider{overflow-y: scroll}
    #content{overflow-y: hidden}
</style>
</head>
<body style="overflow-y: hidden">

<div id="warpper">
    <div class="header clearfix" id="header">
        <a href="javascript:void(0);" class="logo f_l"><img src="Public/Admin/img/logo.png" alt="" /></a>
        <div class="info f_r">
            <p><span>欢迎您，<{$user}></span>|<a href="<{u('Public/logout')}>" class="logout">退出</a></p>
            <p><{*绑定总会员数：1000（不含当日）*}></p>
        </div>
    </div>

    <div class="main">
        <!--菜单-->
        <div class="slider" id="slider" >
            <ul>
                <{foreach from=$menus item=menu }>
                <li>
                    <dl>
                        <dt class="<{$menu['class']}>"><{$menu['title']}></dt>
                        <{foreach from=$menu['items'] item=item}>
                        <dd><a href="<{$item[1]}>" target="subContent" onclick="openLoading();"><{$item[0]}></a></dd>
                        <{/foreach}>
                    </dl>
                </li>
                <{/foreach}>
            </ul>
        </div>

        <div  id="content" style="position: relative;margin-left: 190px;box-sizing: border-box;" >
            <iframe name="subContent" rows="50%,50%" style=" position:absolute;margin:0;padding:0; height:100%;width:100%;right:0px;border:solid 0px red;" id="containerFrame" width="100%" height="100%"></iframe>
        </div>
    </div>


</div>
<{include file="Public/foot.html" }>
<script>

//    $("dt").on('click',function(){
//        $(this).nextAll("dd").toggle()
//    });
    $('dd>a').on('click',function(){
        $('dd').removeClass("selected");
        $(this).parent().addClass("selected");
    });


    function resizeWindow(){
        $('#content,#slider').height($("body").height()-$('#header').height()-10);
    }
    $(document).ready(function(){
        resizeWindow();
    })
    $(window).resize(function(){
        resizeWindow();
    })

    function openLoading(){
       layer.msg('加载中，请稍候', {
            icon: 16,
            shade: [0.3, '#000'],
            time:10000
        });

        //此处用setTimeout演示ajax的回调
//        setTimeout(function(){
//          layer.close(li);
//        }, 2000);
    }
    function closeLoading() {
        layer.closeAll();
    }
</script>
</body>
</html>